<template>
  <div>
    <a-modal v-model="visible" title="预约物流" :width="800" centered @ok="handleSubmit" destroyOnClose>
      <AppointmentExpress :unionId="unionId" :defLogistic="defLogistic" @changePickTime="changePickTime" @changeAddress="changeAddress"></AppointmentExpress>
      <!-- <a-form>
        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户地址：" required>
          <p>
            <span>{{ address.contactName }}</span
            ><a-divider type="vertical" /><span>{{ address.contactPhone }}</span
            ><a-divider type="vertical" /><span>{{ address.province }} {{ address.city }} {{ address.district }} {{ address.address }}</span
            ><span class="btn" style="margin-left:12px;"><a @click="changeAdds">更换</a></span>
          </p>
        </a-form-item>

        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="预约时间：" required>
          <a-cascader :options="options" placeholder="请选择" @change="onChange" />
        </a-form-item>
      </a-form> -->
    </a-modal>
    <Address ref="address" :unionId="unionId" :defLogistic="defLogistic" @newAddress="newAddress" :title="'客户地址'"></Address>
  </div>
</template>
<script>
import Address from '@/views/box/components/Address/AddressList'
import AppointmentExpress from './appointmentExpress'
import { returnTime } from '@/api/box/order'
export default {
  components: {
    Address,
    AppointmentExpress
  },
  data() {
    return {
      unionId: '',
      defLogistic: {},
      visible: false,
      labelCol: {
        xs: { span: 3 },
        sm: { span: 3 }
      },
      wrapperCol: {
        xs: { span: 21 },
        sm: { span: 21 }
      },
      pickTime: [],
      newAddress: {}
    }
  },
  methods: {
    show(unionId, defLogistic) {
      this.unionId = unionId
      this.defLogistic = defLogistic
      this.visible = true
    },
    // 选择时间
    changePickTime(value) {
      this.pickTime = value
      console.log(this.pickTime)
    },
    // 变更地址
    changeAddress(record) {
      this.newAddress = record
    },
    // 提交
    handleSubmit() {}
  }
}
</script>
<style lang="less" scoped>
.ant-form {
  /deep/.ant-form-item {
    margin-bottom: 12px;
  }
}
</style>
